package uni.call.app;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ContactUsActivity extends Activity
{
	 public void onCreate(Bundle savedInstanceState) 
	 {
		 super.onCreate(savedInstanceState);
		 setContentView(R.layout.contact_us);

		 Button EmailBT = (Button)findViewById(R.id.ComposeEmail);
		 EmailBT.setOnClickListener(EmailListener);
	        	        
		 Button SMSBT = (Button)findViewById(R.id.ComposeSMS);
		 SMSBT.setOnClickListener(SMSListener);
	 }
	 
	 private OnClickListener EmailListener = new OnClickListener()
	    {
	        public void onClick(View v) 
	        {
	        	Intent intent = new Intent(Intent.ACTION_SEND);
	            intent.setType("plain/text");
	            intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"tareq.aljarrah@gmail.com,husain.yaqoob@googlemail.com"});                  
            	intent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.EmailSubject)); 
            	intent.putExtra(Intent.EXTRA_TEXT, getString(R.string.EmailBody)); 
            	startActivity(intent);
	        }
	    };

	    private OnClickListener SMSListener = new OnClickListener()
	    {
	        public void onClick(View v) 
	        {
	        	String number = "+962799600610;+962799146899";
	        	Intent sendIntent = new Intent(Intent.ACTION_VIEW, Uri.fromParts("sms", number, null));
	        	startActivity(sendIntent);
	        }
	    };
}
